package com.example.file.Controller;

import com.example.file.entity.SysDict;
import com.example.file.entity.SysFileInfo;
import com.example.file.param.SysFileInfoParam;
import com.example.file.service.SysDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/ip")
public class SysDictController {


    @Autowired
    private SysDictService sysDictService;


    @PostMapping("/address")
    public List<SysDict> ipaddress(Long id) {
        SysDict sysDict = sysDictService.insertIp(id);
        List<SysDict> results = new ArrayList<>();
        results.add(sysDict);
        return results;
    }
}
